
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib  prefix="s"  uri="/struts-tags"%>
<jsp:useBean id="ed" class="mytools.examDAO" scope="page"></jsp:useBean>
<jsp:useBean id="exam" class="mytools.exam" scope="page"></jsp:useBean>

<%
            String e = request.getParameter("eid");
            int eid;
            if (e != null) {
                eid = Integer.parseInt(request.getParameter("eid"));
            } else {
                eid = 1;
            }
            exam = ed.getexam(eid);
            //out.println(exam.getEc());
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>选择选择题</title>
        <link href="css/global.css" rel="stylesheet" type="text/css">
        <script  type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript"  src="js/picnet.table.filter.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                var options1 = {
                    additionalFilterTriggers: [$('#quickfind')],
                    clearFiltersControls: [$('#cleanfilters')],
                    matchingRow: function(state, tr, textTokens) {
                        if (!state || !state.id) {
                            return true;
                        }
                        switch (state.id) {
                            default: return true;
                        }
                    }
                };

                $('#choiceshow').tableFilter(options1);

                var ec='<%=exam.getEc()%>';
                var ids=ec.split(",");
                $(":checkbox[name=id]").val(ids);

                $('table.striped tr:even').addClass('even');
                $('table.striped tbody tr').mouseover(function() {
                    $(this).addClass('highlight');
                    $(this).css('cursor','pointer');
                }).mouseout(function() {
                    $(this).removeClass('highlight');
                });
            });
           
        </script>

    </head>
    <body>
        <div id="examup">
            为试卷<em><s:property value="#parameters.eid"></s:property>&nbsp;</em>选题 :
            <form action="updateec.action" method="post" id="test" >
                <input type="hidden" name="eid" value="<s:property value="#parameters.eid"></s:property>">
                查询: <input type="text" id="quickfind"/>
                <br>
                <a id="cleanfilters" href="#">重置条件</a>
                <div id="eedit">
                    <table id="choiceshow"  class="striped" >
                        <thead>
                            <tr>
                                <th filter='false'>选择</th>
                                <th filter='false'>题号</th>
                                <th filter-type='ddl'>科目</th>
                                <th filter-type='ddl'>题型</th>
                                <th filter-type='ddl'>章节</th>
                                <th filter='false'>章节信息</th>
                                <th filter-type='ddl'>难度</th>
                                <th filter='false'>题目内容</th>
                                <th filter='false'>选项A</th>
                                <th filter='false'>选项B</th>
                                <th filter='false'>选项C</th>
                                <th filter='false'>选项D</th>
                                <th filter='false'>答案</th>
                            </tr>
                        </thead>
                        <tbody>
                            <s:iterator value="choicelist" status="st">
                                <tr>
                                    <td width="28px"><input type="checkbox" name="id" value="<s:property value="id"></s:property>"></td>
                                    <td width="26px"><s:property value="id"></s:property></td>
                                    <td width="60px"><s:property value="subject"></s:property></td>
                                    <td width="40px"><s:property value="type"></s:property></td>
                                    <td width="40px"><s:property value="chapter"></s:property></td>
                                    <td width="60px"><s:property value="chapterinfo"></s:property></td>
                                    <td width="40px"><s:property value="level"></s:property></td>
                                    <td width="220px"><s:property value="name"></s:property></td>
                                    <td><s:property value="a"></s:property></td>
                                    <td><s:property value="b"></s:property></td>
                                    <td><s:property value="c"></s:property></td>
                                    <td><s:property value="d"></s:property></td>
                                    <td width="30px"><s:property value="answer"></s:property></td>
                                </tr>
                            </s:iterator>
                        </tbody>
                    </table>
                </div>
                <s:submit value="提交" id="submit"></s:submit>
                <input type="button"  id="submit" onclick="history.back()" value="返回" >
            </form>
        </div>
    </body>
</html>
